package parameter;

public class BoyTest {
	public static void main(String[] args) {
		/*
		Dog d1 = new Dog();
		d1.name = "wang";
		// 引用之间的赋值相当于别名
		Dog d2 = d1;
		System.out.println(d1);
		System.out.println(d2);
		*/
	
		//1.创建对象
		Dog dog = new Dog(); //@7852e922
		dog.name = "旺财";
		
		Boy boy = new Boy();
		boy.name = "小明";
		
		boy.walkWithDog(dog);
		
		Dog dog2 = new Dog();
		dog2.name = "大强";
	
		boy.walkWithDog(dog2);
		
		
	}
}
